#define _CRT_SECURE_NO_WARNINGS 1
#include "game.h"


void InitBoard(char board[ROWS][COLS], int rows, int cols, char set)
{
	int i = 0;
	for (i = 0; i < rows; i++)
	{
		int j = 0;
		for (j = 0; j < cols; j++)
		{
			board[i][j] = set;
		}
	}
}


void DisplayBoard(char board[ROW][COL], int row, int col)
{
	int i = 0;
	printf("------------扫雷游戏---------\n");
	for (i = 0; i <= col; i++) //打印列号，i从0开始，是可以实现不会错位
	{
		printf("%d ", i);
	}
	printf("\n");

	for (i = 1; i <= row; i++)//9*9的棋盘，从1到9
	{
		printf("%d ", i);//打印行号
		int j = 0;
		for (j = 1; j <= col; j++)
		{
			printf("%c ", board[i][j]);
		}
		printf("\n");
	}
}